﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using SydEnergiPrototype.Kernel;
using SydEnergiPrototype.Logic;
using SydEnergiPrototype.ViewModel;

namespace SydEnergiPrototype.View
{
    public partial class AddDataView : PhoneApplicationPage
    {
        private IDataViewModel _viewModel;
        public AddDataView()
        {
            InitializeComponent();
        }

        protected override void OnFragmentNavigation(System.Windows.Navigation.FragmentNavigationEventArgs e)
        {
            base.OnFragmentNavigation(e);
            _viewModel = IoCContainer.Get<IDataViewModel>(e.Fragment);
            LayoutRoot.DataContext = _viewModel;
        }

        public void Save_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/View/FinalizeEditView.xaml", UriKind.Relative));
        }
    }
}